<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单输入</title>
    <script src="./vue.js"></script>
</head>
<body>

<div id="app">

    <textarea style="width: 400px" v-model="message">{{message}}</textarea>
    <p>{{message}}</p>
    <h1>复选框</h1>
    <input type="checkbox" v-model="checked" value="艾瑞">
    <p>{{checked}}</p>
    <h1>多个复选框</h1>
    <input type="checkbox" id="java" value="java-v" v-model="checkedNames">
    <input type="checkbox" id="html" value="html-v" v-model="checkedNames">
    <input type="checkbox" id="vae" value="vue-v" v-model="checkedNames">
    <p>{{checkedNames}}</p>
    <h1>单选按钮</h1>
    <input type="radio" name="sex" value="男" v-model="picked">
    <input type="radio" name="sex" value="女" v-model="picked">
    <p>{{picked}}</p>
    <h1>下拉选择框</h1>
    <select v-model="selected">
        <option value="" disabled>请选择</option>
        <option value="java">java</option>
        <option value="html">html</option>
        <option value="vue">vue</option>
    </select>
    <p>{{selected}}</p>
</div>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            message: 'aaa',
            checked: false,
            checkedNames: [],
            picked: '',
            selected: ''
        }
    })
</script>

</body>
</html>